package com.jxc.service.impl;

import com.jxc.entity.Menu;
import com.jxc.repository.MenuRepository;
import com.jxc.service.MenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 菜单Service接口实现
 *
 * @author 高旭
 * @date 2021-03-26
 */
@Service("menuService")
public class MenuServiceImpl implements MenuService {

    @Resource
    private MenuRepository menuRepository;

    @Override
    public List<Menu> findMenusByParentIdAndRoleId(int parentId, int roleId) {
        return menuRepository.findMenusByParentIdAndRoleId(parentId, roleId);
    }

}
